def fall_rebound(input_number1,input_number2):
    high = int(input_number1)
    freq = int(input_number2)
    # 内置变量
    nums_list = []
    count = 0

    while count < freq:
        if count == 0:
            nums_list.append(high)
            high /= 2
            count += 1
        else:
            nums_list.append(2*high)
            high /= 2
            count += 1
    print(nums_list)
    print(sum(nums_list))

input_number1 = input("请输入初始下落高度:")
input_number2 = input("请输入下落次数:")

result = fall_rebound(input_number1,input_number2)
print(result)

